package com.daxiong.model;

import java.io.Serializable;

/**
 * 供应商信息
 *
 * @author sunyanxiong
 * @date 2017/4/28
 */
public class GysInfo implements Serializable {

    private String id;
    private String gysName;
    private String shortName;
    private String address;
    private String postcode;
    private String telphone;
    private String fax;
    private String cantact;
    private String cantactPhone;
    private String depositBank;
    private String email;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getGysName() {
        return gysName;
    }

    public void setGysName(String gysName) {
        this.gysName = gysName;
    }

    public String getShortName() {
        return shortName;
    }

    public void setShortName(String shortName) {
        this.shortName = shortName;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getPostcode() {
        return postcode;
    }

    public void setPostcode(String postcode) {
        this.postcode = postcode;
    }

    public String getTelphone() {
        return telphone;
    }

    public void setTelphone(String telphone) {
        this.telphone = telphone;
    }

    public String getFax() {
        return fax;
    }

    public void setFax(String fax) {
        this.fax = fax;
    }

    public String getCantact() {
        return cantact;
    }

    public void setCantact(String cantact) {
        this.cantact = cantact;
    }

    public String getCantactPhone() {
        return cantactPhone;
    }

    public void setCantactPhone(String cantactPhone) {
        this.cantactPhone = cantactPhone;
    }

    public String getDepositBank() {
        return depositBank;
    }

    public void setDepositBank(String depositBank) {
        this.depositBank = depositBank;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public GysInfo() {

    }

    @Override
    public String toString() {
        return getGysName();
    }

    // 重写 hashCode()
    @Override
    public int hashCode() {
        final int PRIME = 31;
        int result = 1;
        result = PRIME * result + ((null == id) ? 0 : id.hashCode());
        result = PRIME * result + ((null == gysName) ? 0 : gysName.hashCode());
        result = PRIME * result + ((null == shortName) ? 0 : shortName.hashCode());
        result = PRIME * result + ((null == address) ? 0 : address.hashCode());
        result = PRIME * result + ((null == postcode) ? 0 : postcode.hashCode());
        result = PRIME * result + ((null == telphone) ? 0 : telphone.hashCode());
        result = PRIME * result + ((null == fax) ? 0 : fax.hashCode());
        result = PRIME * result + ((null == cantact) ? 0 : cantact.hashCode());
        result = PRIME * result + ((null == cantactPhone) ? 0 : cantactPhone.hashCode());
        result = PRIME * result + ((null == depositBank) ? 0 : depositBank.hashCode());
        result = PRIME * result + ((null == email) ? 0 : email.hashCode());
        return result;
    }

    // 重写 equals()
    @Override
    public boolean equals(Object object) {
        if (object == this) {
            return true;
        }
        if (null == this) {
            return false;
        }
        if (object.getClass() != getClass()) {
            return false;
        }

        final GysInfo gysInfo = (GysInfo) object;
        if (null == id) {
            if (null != gysInfo.id) {
                return false;
            }
        } else if (!id.equals(gysInfo.id)) {
            return false;
        }

        if (null == gysName) {
            if (null != gysInfo.gysName) {
                return false;
            }
        } else if (!gysName.equals(gysInfo.gysName)) {
            return false;
        }

        if (null == shortName) {
            if (null != gysInfo.shortName) {
                return false;
            }
        } else if (!shortName.equals(gysInfo.shortName)) {
            return false;
        }

        if (null == address) {
            if (null != gysInfo.address) {
                return false;
            }
        } else if (!address.equals(gysInfo.address)) {
            return false;
        }

        if (null == postcode) {
            if (null != gysInfo.postcode) {
                return false;
            }
        } else if (!postcode.equals(gysInfo.postcode)) {
            return false;
        }

        if (null == telphone) {
            if (null != gysInfo.telphone) {
                return false;
            }
        } else if (!telphone.equals(gysInfo.telphone)) {
            return false;
        }

        if (null == fax) {
            if (null != gysInfo.fax) {
                return false;
            }
        } else if (!fax.equals(gysInfo.fax)) {
            return false;
        }

        if (null == cantact) {
            if (null != gysInfo.cantact) {
                return false;
            }
        } else if (!cantact.equals(gysInfo.cantact)) {
            return false;
        }

        if (null == cantactPhone) {
            if (null != gysInfo.cantactPhone) {
                return false;
            }
        } else if (!cantactPhone.equals(gysInfo.cantactPhone)) {
            return false;
        }

        if (null == depositBank) {
            if (null != gysInfo.depositBank) {
                return false;
            }
        } else if (!depositBank.equals(gysInfo.depositBank)) {
            return false;
        }

        if (null == email) {
            if (null != gysInfo.email) {
                return false;
            }
        } else if (!email.equals(gysInfo.email)) {
            return false;
        }

        return true;
    }
}
